<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://www.ccut.edu.cn/saturn" prefix="saturn"%>
<%@page import="edu.ccut.saturn.component.SaturnDebugThreadsManager"%>
<%@page import="java.util.*"%>
<%@page import="edu.ccut.saturn.component.IDebugThread"%>
<%@page import="edu.ccut.saturn.component.IParameterInfo"%>

<%@ include file="/jsp/include/header/meta.jsp"%>
<%@ include file="/jsp/include/header/stylesheettag.jsp"%>
<%@ include file="/jsp/include/header/javascript.jsp"%>

<html>
<head>
<title>Saturn Debug</title>
<style type="text/css">
.showDiv {
	color: graytext;
	position: relative;
	top: 200px;
	left: 50%;
	height: 25px;
}
</style>
</head>
<body>
<a href="start.jsp">开始</a>
<a href="end.jsp">停止</a>
<a href="clear.jsp">清空</a>
<a href="index.jsp">刷新</a>
<%
			request.setAttribute("treeList", SaturnDebugThreadsManager
			.getInstance().getOverDebugThreadTreeList());
			
			Map scopeMap = (Map)session.getAttribute("debug_saturn_scope");
			if (scopeMap == null) {
				scopeMap = new HashMap();
				scopeMap.put(IParameterInfo.SCOPE_LOGIC , "logic");
				scopeMap.put(IParameterInfo.SCOPE_REQUEST, "request");
				scopeMap.put(IParameterInfo.SCOPE_SESSION, "session");
				scopeMap.put(IParameterInfo.SCOPE_APPLICATOIN, "application");
				
				session.setAttribute("debug_saturn_scope", scopeMap);
			} 
			
			Map inoutMap = (Map)session.getAttribute("debug_saturn_in_out");
			if (inoutMap == null) {
				inoutMap = new HashMap();
				inoutMap.put(IParameterInfo.PASSING_IN, "输入");
				inoutMap.put(IParameterInfo.PASSING_OUT, "输出");
				inoutMap.put(IParameterInfo.PASSING_IN_OUT, "输入输出");
				inoutMap.put(IParameterInfo.PASSING_UNDEFINE, "未定义");
				
				session.setAttribute("debug_saturn_in_out", inoutMap);
			}
%>
<script>
function noneShow(){
//document.getElementById("showInfo").style.display="none";
document.getElementById("showInfo").innerText="";
}
setTimeout("noneShow()",2000);
</script>
<%if(request.getAttribute("succ")!=null){%>
<div id="showInfo" class="showDiv"><img
	src="<%=request.getContextPath() %>/images/loading.gif" />&nbsp;&nbsp;<%=request.getAttribute("succ")%></div>
<%}else{%>
<div class="showDiv" id="showInfo">&nbsp;&nbsp;</div>
<%}%>
<saturn:splitpanel orientation="horizontal" id="splitpanel1"
	position="203">
	<saturn:tree id="tree1" target="detail" nodeIdKey="id"
		nodeParentIdKey="parentId" nodeLabelKey="name"
		nodeCheckableKey="checkable" nodeExpandedKey="expanded"
		nodeExpandedIconKey="expandedIcon" nodePathKey="path"
		nodeIconKey="icon" value="${treeList}" />
	<saturn:splitter />
	<iframe frameborder="0" id="detail" name="detail" width="100%" height="100%"
		scrolling="auto" src=""></iframe>
</saturn:splitpanel>
</body>
</html>